package com.roadmap.struts.form.admin.life;

import java.util.Date;

import com.roadmap.struts.action.ActionConst;
import com.roadmap.struts.form.admin.RdcForm;

public class TaskForm extends RdcForm {
	private static final long serialVersionUID = 2120584332094299965L;
	private String planId; // the plan's id
	private String planName; // the plan's name
	private String content; 
	private int status; 
	private String rank; 
	private int score;
	private Date scheduledStartDate;
	private Date scheduledEndDate;
	private Date realStartDate;
	private Date realEndDate;
	private int proportion;
	private int progress;
	private Date latestExecDate;
	private int execCount;
	private int tatalExecTime;

	public String getPlanId() {
		return planId;
	}

	public void setPlanId(String planId) {
		this.planId = planId;
	}

	public String getPlanName() {
		return planName;
	}

	public void setPlanName(String planName) {
		this.planName = planName;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public int getStatus() {
		return status;
	}

	public void setStatus(int status) {
		this.status = status;
	}

	public String getRank() {
		return rank;
	}

	public void setRank(String rank) {
		this.rank = rank;
	}

	public int getScore() {
		return score;
	}

	public void setScore(int score) {
		this.score = score;
	}

	public Date getScheduledStartDate() {
		return scheduledStartDate;
	}

	public void setScheduledStartDate(Date scheduledStartDate) {
		this.scheduledStartDate = scheduledStartDate;
	}

	public Date getScheduledEndDate() {
		return scheduledEndDate;
	}

	public void setScheduledEndDate(Date scheduledEndDate) {
		this.scheduledEndDate = scheduledEndDate;
	}

	public Date getRealStartDate() {
		return realStartDate;
	}

	public void setRealStartDate(Date realStartDate) {
		this.realStartDate = realStartDate;
	}

	public Date getRealEndDate() {
		return realEndDate;
	}

	public void setRealEndDate(Date realEndDate) {
		this.realEndDate = realEndDate;
	}

	public int getProgress() {
		return progress;
	}

	public void setProgress(int progress) {
		this.progress = progress;
	}

	public int getProportion() {
		return proportion;
	}

	public void setProportion(int proportion) {
		this.proportion = proportion;
	}

	@Override
	public String getShortDescription(){
		String desc = getContent();
		if(desc != null && desc.length() > ActionConst.Displayed_Name_Max_Length){
			desc = desc.substring(0, ActionConst.Displayed_Name_Max_Length) + "...";
		}
		return desc;
	}

	public Date getLatestExecDate() {
		return latestExecDate;
	}

	public void setLatestExecDate(Date latestExecDate) {
		this.latestExecDate = latestExecDate;
	}

	public int getExecCount() {
		return execCount;
	}

	public void setExecCount(int execCount) {
		this.execCount = execCount;
	}

	public int getTatalExecTime() {
		return tatalExecTime;
	}

	public void setTatalExecTime(int tatalExecTime) {
		this.tatalExecTime = tatalExecTime;
	}
}
